package com.liya.Dao;

import com.liya.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.Set;

/**
 * @author LiYa
 * @version 1.0
 * @className UserDao
 * @description TODO
 * @science 2020/9/22 19:38
 */
public interface UserDao {
    Set<User> queryAll();
    int insertByUser(User user);
    int deleteByUser(User user);
    int updateByUser(User user);
    int deleteById(Integer userId);
    int deleteByIds(@Param("userIds") Set<Integer> userIds); //逻辑删除一批用户
    //根据column和column值进行用户的条件查询
    Set<User> queryByColumn(@Param("column") String column, @Param("columnValue") String columnValue);
    //根据用户姓名、电话、角色名进行模糊查询
    Set<User> queryByMultiConditions(@Param("userName") String userName,
                                     @Param("userPhone") String userPhone,
                                     @Param("roleName") String roleName);
}
